<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>瑞曼-论坛</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/skin.css">
<script language="javascript" src="${pageContext.request.contextPath }/js/jquery-1.4.2.js"></script>
<script language="javascript" src="${pageContext.request.contextPath}/js/ForumUtils.js"></script>
<script type="text/javascript">
$().ready(function(){
    //设置分页要跳转到的url
	$("body").data("url","forumAction_showPageResult.action");
	//声明分页的事件
	ForumUtils.forum.initEvent();
});
</script>
</head>
    <body>
        <div id="body">
            <h3>RainMan-论坛</h3>
            <div id="nav">
                <ul>
                    <li><a href="forumAction_showPageResult.action">首页</a></li>
                    <li><a href="forwardAction_publishforum.action">发表帖子</a></li>
                    <li><a href="forwardAction_luntanmanage.action">论坛管理</a></li>
					<li><a href="forwardAction_login.action">登录</a></li>
					<li><a href="userAction_register.action">注册</a></li>
                    <li><a href="#">联系我们</a></li>
                </ul>
            </div>
            <div id="cont">
                <!-- 留言区域开始 -->
                <s:if test="#request.forumVOlist">
                <s:iterator value="%{#request.forumVOlist}" var="forumVO" status="st">
                <div class="mes">
                    <div class="title">
                        <ul>
                            <li>序号：<s:property value="#st.index + 1"/></li>
                            <li>时间：<s:property value="%{#forumVO.publishtime}"/></li>
                            <li>姓名：<s:property value="%{#forumVO.username}"/></li>
                            <li>标题：<s:property value="%{#forumVO.title}"/></li>
                        </ul>
                    </div>
                    <div class="txt">
                        <span>内容：</span><p><s:property value="%{#forumVO.publishcontent}"/></p>
                    </div>
                    <s:if test="#forumVO.forumliuyanvos">              
                    <div class="rep">
                     <s:iterator value="%{#forumVO.forumliuyanvos}" var="forumliuyanVO">
                        <span style="font-weight:bold"><s:property value="%{#forumliuyanVO.username}"/>回复：</span><p><s:property value="%{#forumliuyanVO.replycontent}"/></p>
					</s:iterator>						
					</div>
					</s:if>
                </div>
                </s:iterator>
                </s:if>
                <!-- 留言区域止 -->
                
                <div id="page">
                    <span><a id="firstPage" param="1" flag="firstPage">首页</a></span>
                    <ul>
                        <li><a id="prepPage" flag="prePage" param="${PageResult.currentPage-1}">上一页</a></li>              
                        <li><a id="nextPage" param="${PageResult.currentPage+1}" flag="nextPage" last="${PageResult.totalPages}">下一页</a></li>
                        <li><a id="lastPage" param="${PageResult.totalPages}" flag="lastPage">尾页</a></li>
                        <li>总共有${PageResult.totalRows}条记录</li>
                        <li>当前是第${PageResult.currentPage}/${PageResult.totalPages}页</li>
                    </ul>
                </div>
            </div>
            <div id="foot">
                <p>RainMan-论坛 e-mail:zyc521008@sina.com</p>
                <p>Powered by 瑞曼论坛 V1.0 瑞曼科技 www.rain-man.cn</p>
            </div>
        </div>
    </body>
</html>